Script: --on windowEvent wdID,wdName,objNo,objName,objValue┬if objValue="Open" then ┬ global changedConversions┬ put "false" into changedConversions -- initialize┬else if objValue="Close" then ┬ ┬else if objValue="Suspend" then ┬ ┬else if objValue="Resume" then ┬ ┬else if objValue="CloseBox" then ┬ ┬else if objValue="ZoomBox" then ┬ ┬else if objValue="GrowBox" then ┬ ┬else if objValue="TitleBar" then ┬ ┬end if┬┬--end windowEvent┬┬┬
Params: i2_Text┬i0_TopLeft
Result: i0_AutoSize
ItemType: PUSH
Rect: 104,189,176,209
Name: Done
DefaultItem: TRUE
AutoClose: TRUE
ItemType: LIST
Rect: 79,35,196,104
TextFont: Geneva
TextSize: 10
AutoSize: FALSE
Name: typeList
Logic: Single
KeyScroll: TRUE
Text:
Script: --on mouseUp wdID,wdName,objNo,objName,objValue┬get wsGet(wdID,"typeList","SelectionText")┬if it¡empty then┬ put it into ss┬ wsSet wdID,"picked","Text",ss┬ wsSet wdID,"Rename","Disabled", "false"┬ wsSet wdID,"delete","Disabled", "false"┬ wsSet wdID,"10","Disabled", "false"┬ wsSet wdID,"11","Disabled", "false"┬ get line textToLineNum(ss,fld "cTypes") of fld "cNums"┬ put it into info┬ global cSign┬ put (ss&" = one "&cSign) into qq┬ wsSet wdID,"text1","text",qq┬ put (cSign&" = one "&ss) into qq┬ wsSet wdID,"text2","text",qq┬ if item 2 of info="true" then -- top button hilited┬ wsSet wdID,"10","Hilite", "TRUE"┬ wsSet wdID,"c1","Disabled", "false"┬ wsSet wdID,"c1","Text",item 1 of info┬ wsSet wdID,"c1","selection", "0,100"┬ wsSet wdID,"c2","Text",""┬ wsSet wdID,"c2","disabled","true"┬ else -- bottom button hilited┬ wsSet wdID,"11","Hilite", "TRUE"┬ wsSet wdID,"c2","Disabled", "false"┬ wsSet wdID,"c2","Text",item 1 of info┬ wsSet wdID,"c2","selection", "0,100"┬ wsSet wdID,"c1","Text",""┬ wsSet wdID,"c1","disabled","true"┬ end if┬else┬ wsSet wdID,"Rename","Disabled", "true"┬ wsSet wdID,"delete","Disabled", "true"┬ wsSet wdID,"10","Disabled", "true"┬ wsSet wdID,"11","Disabled", "true"┬ wsSet wdID,"c1","text",""┬ wsSet wdID,"c2","text",""┬ wsSet wdID,"c1","Disabled", "true"┬ wsSet wdID,"c2","Disabled", "true"┬ wsSet wdID,"text1","text",""┬ wsSet wdID,"text2","text",""┬ wsSet wdID,"picked","Text",""┬end if┬--end mouseUp┬┬
ItemType: LBL
Rect: 3,2,98,15
TextFont: Geneva
TextSize: 10
TextStyle: Bold
Text: Available Types
ItemType: PUSH
Rect: 208,35,268,52
TextFont: Geneva
TextSize: 10
AutoSize: FALSE
Name: New type
Script: --on mouseUp wdID,wdName,objNo,objName,objValue┬get smallask("Name of new type?")┬if it¡"Ñ" then┬ put it into newName┬ put NTFSqueezeText(fld "cTypes") into tt┬ if newName is not in tt then┬ put return&newName after tt┬ -- don't sort unless co-sort other lists (Flds cTypes & cNums)┬ put NTFSqueezeText(tt) into tt┬ put tt into fld "cTypes"┬ wsSet wdID,"typeList","Text",tt┬ get wsGet(wdID,"type","SelectionText")┬ put it into oldType┬ wsSet wdID,"type","Text",tt┬ wsSet wdID,"type","SelectionText",oldType┬ wsSet wdID,"typeList","SelectionText",newName┬ wsSet wdID,"Rename","Disabled","false"┬ wsSet wdID,"Delete","Disabled","false"┬ wsSet wdID,"10","Disabled", "false"┬ wsSet wdID,"11","Disabled", "false"┬ put newName into ss┬ wsSet wdID,"picked","Text",ss┬ global cSign┬ put (ss&" = one "&cSign) into qq┬ wsSet wdID,"text1","text",qq┬ put (cSign&" = one "&ss) into qq┬ wsSet wdID,"text2","text",qq┬ -- top button hilited as a default┬ wsSet wdID,"10","Hilite", "TRUE"┬ wsSet wdID,"c1","Disabled", "false"┬ wsSet wdID,"c1","Text",""┬ wsSet wdID,"c1","selection", "0,100"┬ wsSet wdID,"c2","Text",""┬ wsSet wdID,"c2","disabled","true"┬ else┬ get errorAns("You already have a type by that name.")┬ end if┬end if┬--end mouseUp
ItemType: PUSH
Rect: 208,61,268,78
TextFont: Geneva
TextSize: 10
AutoSize: FALSE
Disabled: TRUE
Name: Rename
Script: --on mouseUp wdID,wdName,objNo,objName,objValue┬get wsGet(wdID,"typeList","SelectionText")┬put it into oldName┬put "New name for ╥"&oldName&"╙?" into qq┬get smallask(qq)┬if it¡"Ñ" then┬ put it into newName┬ put NTFSqueezeText(fld "cTypes") into tt┬ if newName is not in tt then┬ put newName into line textToLineNum(oldName,tt) of tt┬ put FullSort(tt) into tt┬ put tt into fld "cTypes"┬ wsSet wdID,"typeList","Text",tt┬ wsSet wdID,"type","Text",tt┬ wsSet wdID,"typeList","SelectionText",newName┬ global cSign┬ put ("ex.: one "&cSign&" = _____ "&newName) into qq┬ wsSet wdID,"text1","text",qq┬ put ("ex.: one "&newName&" = _____ "&cSign) into qq┬ wsSet wdID,"text2","text",qq┬ wsSet wdID,"picked","text",newName┬ wsSet wdID,"Rename","Disabled", "false"┬ wsSet wdID,"delete","Disabled", "false"┬ else┬ errorAns("You already have a type by that name.")┬ end if┬end if┬--end mouseUp┬
ItemType: PUSH
Rect: 208,87,268,104
TextFont: Geneva
TextSize: 10
AutoSize: FALSE
Disabled: TRUE
Name: Delete
Script: --on mouseUp wdID,wdName,objNo,objName,objValue┬get wsGet(wdID,"typeList","SelectionText")┬put it into oldName┬put "Really delete ╥"&oldName&"╙?" into qq┬get smallAns(qq)┬if it="OK" then┬ put fld "cTypes" into tt┬ if oldName is in tt then┬ put textToLineNum(oldName,tt) into liner┬ delete line liner of tt┬ put tt into fld "cTypes"┬ delete line liner of fld "cNums"┬ wsSet wdID,"typeList","Text",tt┬ wsSet wdID,"type","Text",tt┬ wsSet wdID,"typeList","Selection",0┬ wsSet wdID,"Rename","Disabled", "true"┬ wsSet wdID,"delete","Disabled", "true"┬ wsSet wdID,"c1","Text",""┬ wsSet wdID,"c2","Text",""┬ wsSet wdID,"text1","Text",""┬ wsSet wdID,"text2","Text",""┬ wsSet wdID,"c1","disabled","true"┬ wsSet wdID,"c2","disabled","true"┬ wsSet wdID,"picked","Text",""┬ end if┬end if┬--end mouseUp┬
Script: --on closeField wdID,wdName,objNo,objName,objValue┬-- set this as the value┬get wsGet(wdID,"picked","Text")┬put it into ss┬put fld "cTypes" into tt┬get wsGet(wdID,"c1","Text")┬put stripit(it) into cc┬put textToLineNum(ss,tt) into liner┬put cc into line liner of fld "cNums"┬get wsGet(wdID,"10","Hilite")┬put comma&it after line liner of fld "cNums" -- hilite of top button┬global changedConversions┬put "true" into changedConversions┬--end closeField
ItemType: TEXT
Rect: 79,139,153,157
TextFont: Geneva
TextSize: 10
AutoSize: FALSE
Disabled: TRUE
Name: c2
LockText: FALSE
TextAlign: Right
Script: --on closeField wdID,wdName,objNo,objName,objValue┬-- set this as the value┬get wsGet(wdID,"picked","Text")┬put it into ss┬put fld "cTypes" into tt┬get wsGet(wdID,"c2","Text")┬put stripit(it) into cc┬put textToLineNum(ss,tt) into liner┬put cc into line liner of fld "cNums"┬get wsGet(wdID,"10","Hilite")┬put comma&it after line liner of fld "cNums" -- hilite of top button┬global changedConversions┬put "true" into changedConversions┬--end closeField
ItemType: TEXT
Rect: 156,119,160,132
TextFont: Geneva
TextSize: 10
Name: text1
Balloon: This demonstrates the equivalent.
ItemType: TEXT
Rect: 156,141,160,154
TextFont: Geneva
TextSize: 10
Name: text2
Balloon: This demonstrates the equivalent.
ItemType: LINE
Rect: 28,171,268,172
ItemType: LBL
Rect: 98,3,213,15
TextFont: Geneva
TextSize: 9
Text: (e.g., Gold, Yen, Pounds)
ItemType: TEXT
Rect: 0,35,74,104
TextFont: Geneva
TextSize: 9
AutoSize: FALSE
Name: instr6
TextAlign: Right
Text: Changing the equivalent value will update all details of this type
ItemType: TEXT
Rect: 291,5,488,222
TextFont: Geneva
TextSize: 9
AutoSize: FALSE
Name: HelpText
Text: Ñ Click on a type in the list (or create a new type), then use the ╥Equivalents╙ section to tell the stack how to convert your asset value into your usual currency.┬Ñ The upper Equivalent field is to enter the number of items of this type that are equal to ONE unit of your currency. For example, if 97 Yen equals ONE dollar (and your native currency is dollars), enter 97 into the upper field after activating it with its radio button.┬Ñ The lower Equivalent field is to enter the number of units of your currency that are equal to ONE item of this type. For example, if ONE ounce of gold equals 375 dollars (and your native currency is dollars), enter 375 into this field.